#include <stdio.h>
#include <stdlib.h>

int main()
{
FILE *fp;
    char ch;
    if((fp=fopen("answer.txt","w"))==NULL)
        return 1;
    while(ch=getchar())
    {
        fputc(ch,fp);
        if (ch=='b'){
            if ((ch=getchar())=='y'){
                fputc(ch,fp);
                if ((ch=getchar())=='e'){
                    fputc(ch,fp);
                    break;
                }
            }
        }
    }
    fclose(fp);
    return 0;
}
